package com.foreknow.service.impl;

import com.foreknow.dao.DiseaseMapper;
import com.foreknow.service.Disease;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class DiseaseImpl implements Disease {
    @Autowired
    private DiseaseMapper diseaseMapper;
    @Override
    public List<com.foreknow.entity.Disease> findUsers(String param) {
        return diseaseMapper.findByPage(param);
    }

    @Override
    public com.foreknow.entity.Disease findById(int id) {
        return diseaseMapper.selectByPrimaryKey(id);
    }

    @Override
    public int deleteById(int id) {
        return diseaseMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int delectByids(List<Integer> ids) {
        return diseaseMapper.deleteByIds(ids);
    }

    @Override
    public int updateById(com.foreknow.entity.Disease disease) {
        return diseaseMapper.updateByPrimaryKeySelective(disease);
    }

    @Override
    public int insertDisease(com.foreknow.entity.Disease disease) {
        return diseaseMapper.insertSelective(disease);
    }

    @Override
    public List<com.foreknow.entity.Disease> hightSerchDisease(com.foreknow.entity.Disease disease) {
        return diseaseMapper.heightFindDisea(disease);
    }


}
